package chapter2.No2_2_synchronized同步语句块.p锁对象的改变.demo2;

/**
 * Created by Administrator on 2016/11/15.
 */
public class MyThread extends Thread {
    ServiceClass sc ;
    UserBean userBean;

    public MyThread(ServiceClass sc, UserBean userBean) {
        this.sc = sc;
        this.userBean = userBean;
    }

    @Override
    public void run() {
        sc.methodA(userBean);
    }
}
